chore: migrate from yarn to pnpm - #5849
jmfrancois wants to merge 27 commits into
Conversation
Switches package management from Yarn Classic to pnpm (isolated linker), retiring the webpack/CDN tooling that carried yarn-hoisting assumptions (scripts-config-react-webpack, scripts-config-cdn) instead of patching them, in line with the ongoing webpack->vite and jest->vitest migration. - Delete scripts-config-react-webpack and scripts-config-cdn (dead, no real consumers; held every yarn-hoisting-coupled hack found). - Remove dead jest branch in scripts-core/extends.js and orphaned jest config block in packages/http. - Declare scripts-config-prettier/stylelint as real deps of scripts-core (previously phantom deps that only worked via yarn's flat hoist). - Rewrite scripts-yarn-workspace to shell out to `pnpm -r run --if-present` instead of parsing `yarn workspaces info`. - Swap scripts-publish-local's yarn CLI calls (registry/cache config) to pnpm equivalents. - Root package.json/pnpm-workspace.yaml: packageManager, workspaces, resolutions -> overrides (including a stray per-package resolutions block pnpm doesn't read), script invocations, linkWorkspacePackages (needed since internal @talend/* deps don't use the workspace: protocol, so plain pnpm install silently resolved from the registry instead of linking local packages). - Convert yarn.lock to pnpm-lock.yaml, update CI (composite setup action + all workflows), retire yarn-deduplicate.yml (pnpm dedupes natively). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8d0614e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Per-package changesets for the packages whose behavior actually changed in the yarn->pnpm migration: react-components (build script + dropped resolutions), http (dropped orphaned jest config), scripts-core (real deps instead of phantom hoisted ones, dropped jest-config generation), scripts-yarn-workspace (rewritten to shell out to pnpm, now requires pnpm), scripts-publish-local (registry/cache setup now uses pnpm, now requires pnpm). scripts-config-cdn and scripts-config-react-webpack are deleted entirely, so changesets can't target them (not in the workspace); no changeset added for those two. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The package had already been rewritten to shell out to pnpm during the yarn->pnpm migration, making it a thin wrapper around `pnpm -r run <script> --if-present --workspace-concurrency=1`. Inline that pnpm command directly into the two root scripts that used it (vitest:update, test:cron) and remove the now-unused package, its devDependency, and the superseded changeset that documented its rewrite. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Unused local-registry helper superseded by pnpm equivalents; remove package and its pending changeset. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GITHUB_TOKEN can't read private cross-repo packages. @talend/daikon-tql-client is still private, so pnpm's cold install hits a 403 that yarn's warm cache was masking. Revert the NPM_TOKEN input (and NODE_AUTH_TOKEN env) back to secrets.NPM_TOKEN, as it was before ad59239. Requires the NPM_TOKEN repo secret (a PAT with read:packages) to be recreated in repo settings. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The updated packages/cmf/vitest.config.ts include patterns drop the existing __tests__ suite, and PR workflows may fail for forked PRs due to reliance on secrets.NPM_TOKEN.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR migrates the Talend/UI monorepo from Yarn Classic workspaces to pnpm (isolated/strict node_modules) and updates internal tooling, docs, and CI workflows accordingly, while removing Yarn-specific helpers and dead configuration packages.
Changes:
- Replace Yarn-based root and workspace scripts with pnpm equivalents, introduce
pnpm-workspace.yaml, and pin pnpm viapackageManager/.tool-versions. - Update CI workflows and the shared
setup-nodeaction to install/cache pnpm and to run installs/builds with pnpm. - Cleanup/migration fixes: remove the
@talend/scripts-yarn-workspacepackage, drop legacy Jest config generation and orphaned Jest config blocks, and update i18n extraction configs to use pnpm.
File summaries
| File | Description |
|---|---|
| tools/scripts-yarn-workspace/src/workspace-run.js | Removes Yarn workspace run implementation (package deleted as part of pnpm migration). |
| tools/scripts-yarn-workspace/src/run.js | Removes Yarn spawn runner utility (package deleted). |
| tools/scripts-yarn-workspace/src/index.js | Removes Yarn-workspace CLI entrypoint (package deleted). |
| tools/scripts-yarn-workspace/src/consume.js | Removes command consumer for Yarn workspace runner (package deleted). |
| tools/scripts-yarn-workspace/README.md | Removes docs for Yarn workspace helper (package deleted). |
| tools/scripts-yarn-workspace/package.json | Removes the Yarn-workspace tool package definition (package deleted). |
| tools/scripts-yarn-workspace/eslint.config.mjs | Removes lint config for deleted Yarn-workspace tool. |
| tools/scripts-yarn-workspace/CHANGELOG.md | Removes changelog for deleted Yarn-workspace tool. |
| tools/scripts-core/src/scripts/extends.js | Stops generating Jest config in extends (aligns with Jest phase-out and pnpm constraints). |
| tools/scripts-core/package.json | Adds explicit deps for prettier/stylelint configs to avoid pnpm phantom-dep resolution issues. |
| tools/scripts-core/doc/migration.md | Updates migration docs to pnpm commands. |
| tools/scripts-core/doc/getting-started.md | Updates install docs to pnpm and removes webpack-react config mention. |
| tools/scripts-config-storybook-lib/README.md | Updates installation command example to pnpm. |
| tools/scripts-config-eslint/README.md | Updates usage example from yarn to pnpm. |
| tools/scripts-cmf/README.md | Updates command examples and JSON formatting in docs. |
| pnpm-workspace.yaml | Adds pnpm workspace definition and workspace-level overrides/settings. |
| packages/stepper/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/icons/vite.config.ts | Prevents bundling Node builtins by marking them as Rollup externals for library build. |
| packages/http/package.json | Removes orphaned Jest configuration block. |
| packages/forms/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/faceted-search/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/design-system/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/dataviz/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/containers/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/components/talend-i18n.json | Switches i18n extraction method from yarn to pnpm. |
| packages/components/package.json | Updates internal script invocation to pnpm and removes Yarn resolutions. |
| packages/cmf/vitest.config.ts | Adjusts Vitest include/exclude patterns (currently risks excluding existing tests). |
| package.json | Switches root scripts to pnpm, removes Yarn workspace config/resolutions, pins pnpm via packageManager. |
| .tool-versions | Pins pnpm (and Node) versions for asdf/tooling. |
| .github/workflows/yarn-deduplicate.yml | Removes Yarn-only deduplication workflow. |
| .github/workflows/visual-testing.yml | Migrates workflow install/build steps to pnpm and updates auth token source. |
| .github/workflows/pre-release.yml | Migrates pre-release workflow to pnpm (install/build/changesets). |
| .github/workflows/pr-test.yml | Migrates PR test workflow to pnpm and updates token usage. |
| .github/workflows/pr-lint.yml | Migrates PR lint workflow to pnpm and updates token usage. |
| .github/workflows/pr-demo.yml | Migrates PR demo workflow to pnpm and updates token usage. |
| .github/workflows/icons.yml | Updates setup-node invocation token source. |
| .github/workflows/demo.yml | Migrates demo workflow install/build steps to pnpm and updates token usage. |
| .github/workflows/changeset.yml | Migrates release workflow to pnpm and updates auth token source for install/publish. |
| .github/actions/setup-node/action.yml | Installs pnpm and caches pnpm store (replaces Yarn caching). |
| .changeset/warm-llamas-hoist.md | Records patch change for removing dead Jest config from @talend/http. |
| .changeset/six-otters-migrate.md | Records patch change for @talend/react-components script + removal of per-package resolutions. |
| .changeset/quiet-goats-pnpm.md | Records @talend/scripts-core change for explicit config deps + dropping Jest config generation. |
Review details
- Files reviewed: 42/44 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| uses: ./.github/actions/setup-node | ||
| with: | ||
| NPM_TOKEN: ${{ github.token }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| uses: ./.github/actions/setup-node | ||
| with: | ||
| NPM_TOKEN: ${{ github.token }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| uses: ./.github/actions/setup-node | ||
| with: | ||
| NPM_TOKEN: ${{ github.token }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| uses: ./.github/actions/setup-node | ||
| with: | ||
| NPM_TOKEN: ${{ github.token }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
Summary
node_modules), converting root config, alltools/scripts-*CLIs that shelled out to yarn, and CI workflows.tools/scripts-config-react-webpackandtools/scripts-config-cdn(dead, zero real consumers) instead of patching their yarn-hoisting-coupled code, in line with the ongoing webpack→vite / jest→vitest migration.scripts-core's prettier/stylelint resolution, per-packageresolutionsinpackages/components) and a critical one caught during validation: internal@talend/*deps don't use theworkspace:protocol, so plainpnpm installsilently resolved them from the npm registry instead of linking local workspace code — fixed vialinkWorkspacePackages: true..github/workflows/yarn-deduplicate.yml(pnpm dedupes natively).@talend/scripts-publish-localentirely (unused local-registry helper, no consumers) and its pending changeset.Test plan
pnpm installcompletes clean with no phantom-dependency errorspnpm build:libsucceeds across all 26 workspace packagestalend-scripts extendsresolves all 5 generated config branches (prettier/stylelint/eslint/babel/typescript) end-to-endtalend-yarn-workspaceCLI runs correctly againstpnpm -r run --if-present🤖 Generated with Claude Code